package com.gf.snoopy.constants.enumc;

/**
 * 是否转让
 * @author yesi
 *
 */
public enum IsTrade {
	NO(0,"否"),
	YES(1,"是");
	
	private Integer code;
	
	private String desc;
	
	private IsTrade(Integer code, String desc){
		this.setCode(code);
		this.setDesc(desc);
	}
	
	public static IsTrade parse(Integer code){
		for(IsTrade type:IsTrade.values()){
			if(type.getCode().equals(code)){
				return type;
			}
		}
		return null;
	}

	public Integer getCode() {
		return code;
	}

	public void setCode(Integer code) {
		this.code = code;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}
}
